package com.exam.service.subject;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.exam.common.vo.ExamSubjectVO;
import com.exam.common.vo.page.PageModel;
import com.exam.dao.subject.ExamSubjectDao;
import com.exam.entity.ExamSubject;

@Service
@Transactional
public class SubjectServiceImp implements SubjectService{

	@Autowired
	ExamSubjectDao subjectDao;
	
	@Override
	public PageModel<ExamSubjectVO> findByPage() {
		return subjectDao.findByPage();
	}

	@Override
	public Serializable save(ExamSubject entity) {
		return subjectDao.save(entity);
	}

	@Override
	public Serializable merge(ExamSubject entity) {
		return subjectDao.merge(entity);
	}

	@Override
	public void update(ExamSubject entity) {
		subjectDao.update(entity);
	}

	@Override
	public void saveOrUpdate(ExamSubject entity) {
		subjectDao.saveOrUpdate(entity);
	}

	@Override
	public void delete(ExamSubject entity) {
		subjectDao.delete(entity);
	}

	@Override
	public ExamSubject findByKey(Serializable id) {
		return subjectDao.findByKey(id);
	}

	@Override
	public List<ExamSubject> findAll() {
		return subjectDao.findAll();
	}

	@Override
	public ExamSubjectVO findById(Integer id) {
		return subjectDao.findById(id);
	}

	
}
